package com.intelligent.system.common.response;

public enum ResponseCode {
    SUCCESS(200, "Success"),
    BAD_REQUEST(400, "Bad Request"),
    UNAUTHORIZED(401, "Unauthorized"),
    FORBIDDEN(403, "Forbidden"),
    NOT_FOUND(404, "Not Found"),
    INTERNAL_SERVER_ERROR(500, "Internal Server Error"),
    SYSTEM_ERROR(500, "System Error"),
    // 用户、角色、权限相关
    USER_NOT_FOUND(1002, "User Not Found"),
    USER_ALREADY_EXISTS(1003, "User Already Exists"),
    ROLE_NOT_FOUND(1004, "Role Not Found"),
    ROLE_ALREADY_EXISTS(1005, "Role Already Exists"),
    PERMISSION_NOT_FOUND(1006, "Permission Not Found"),
    OPERATION_FAILED(1001, "Operation Failed"),
    // 菜单相关
    MENU_NOT_FOUND(2001, "Menu Not Found"),
    MENU_ALREADY_EXISTS(2002, "Menu Already Exists"),
    MENU_CREATE_FAILED(2003, "Menu Creation Failed"),
    MENU_UPDATE_FAILED(2004, "Menu Update Failed"),
    MENU_DELETE_FAILED(2005, "Menu Delete Failed"),
    MENU_QUERY_FAILED(2006, "Menu Query Failed"),
    // 角色菜单关联相关
    ROLE_MENU_ASSIGN_FAILED(3001, "Role Menu Assignment Failed"),
    ROLE_MENU_REMOVE_FAILED(3002, "Role Menu Removal Failed");

    private final int code;
    private final String message;

    ResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}